package com.itcast.springDemo.service.impl;

import com.itcast.springDemo.dao.UserDao;
import com.itcast.springDemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    public String findAll()
    {
        System.out.println("我是1111111");
        System.out.println("接收controller封装好的数据");
        System.out.println("处理封装好的这些数据");
        System.out.println("调用dao层持久化数据,得到结果");
        String result = userDao.findAll();
        System.out.println("将结果给controller");
        return result;
    }
}
